package com.rerijaapps.regalitosara.helper;

import java.io.File;

import android.content.Context;
import android.os.Environment;
import android.util.Log;

public class FolderCreate 
{

	public static File retrieveFolder( Context mContext )
	{
		createFolder( mContext );
		Boolean isSDPresent = android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED );
		return new File( isSDPresent ? Environment.getExternalStorageDirectory() + "/" + "Saripi" : mContext.getFilesDir() + "/" + "Saripi" );
	}
	
	public static void createFolder( Context mContext )
	{
		Boolean isSDPresent = android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED );
		File instaAnimoFolder = new File( isSDPresent ? Environment.getExternalStorageDirectory() + "/" + "Saripi" : mContext.getFilesDir() + "/" + "Saripi" );
		if ( !instaAnimoFolder.exists() )
		{
			if ( instaAnimoFolder.mkdir() )
			{
				Log.i( "CREATE_FOLDER", "CREATE_DEFAULT_FOLDER_SUCCED" );
			}
			else
			{
				
			}
		}
	}
	
}
